package design.patterns.structural.proxy.dynamicproxy.cglib;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2019/4/4 11:09
 */
public class LawyerInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
        System.out.println(obj.getClass());
        System.out.println("调用前......");
        proxy.invokeSuper(obj,args);
        System.out.println("调用后......");
        return null;
    }
}
